package com.dao;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name = "Contacts")

public class Contact implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8514610222137120967L;
	
	private Long id;
	private String firstName;
	private String lastName;
	private String emailId;
	private String cellNo;
	private Date birthDate;
	private String website;
	private String contactType;
	private Long contactManager;
	private String isActive;
	

	

	@Id
	@GeneratedValue
	@Column(name="id")
	public Long getId() {
	return id;
	}
	@Column(name="firstname")
	public String getFirstName() {
	return firstName;
	}
	@Column(name="lastname")
	public String getLastName() {
	return lastName;
	}
	@Column(name="email_id")
	public String getEmailId() {
	return emailId;
	}
	@Column(name="cell_no")
	public String getCellNo() {
	return cellNo;
	}
	@Column(name="birthdate")
	public Date getBirthDate() {
	return birthDate;
	}
	@Column(name="website")
	public String getWebsite() {
	return website;
	}
	
	@Column(name="type")
	public String getContactType() {
		return contactType;
	}
	public void setContactType(String contactType) {
		this.contactType = contactType;
	}
	@Column(name="manager")
	public Long getContactManager() {
		return contactManager;
	}
	@Column(name="active")
	public String getIsActive() {
		return isActive;
	}
	public void setContactManager(Long contactManager) {
		this.contactManager = contactManager;
	}
	public void setId(Long id) {
	this.id = id;
	}
	public void setFirstName(String firstName) {
	this.firstName = firstName;
	}
	public void setLastName(String lastName) {
	this.lastName = lastName;
	}
	public void setEmailId(String emailId) {
	this.emailId = emailId;
	}
	public void setCellNo(String cellNo) {
	this.cellNo = cellNo;
	}
	public void setBirthDate(Date birthDate) {
	this.birthDate = birthDate;
	}
	
	public void setWebsite(String website) {
	this.website = website;
	}
	
	public void setIsActive(String isActive) {
		this.isActive = isActive;
	}
	
	public Contact(){}
	public Contact(String emailId, String lastName){
		this.emailId = emailId;
		this.lastName = lastName;
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		int result = 17;
		result = 37*result +emailId.hashCode();
		return result;
	}
	

}
